package itcast.bos.base.dao;

import java.util.Date;

import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import itcast.bos.domain.base.Promotion;

public interface PromotionRespotory extends JpaRepository<Promotion, Integer>{
	
	@Query(value="update Promotion set status = '2' where endDate < ? and status = '1'" )
	@Modifying
	void updataStatus(Date date);

}
